Skip to content

fix: do not return partial matches for threshold 0#766

Closed
RomanHotsiy wants to merge 1 commit intokrisk:mainfrom
RomanHotsiy:fix-indices-threshhold-0
Closed

fix: do not return partial matches for threshold 0#766
RomanHotsiy wants to merge 1 commit intokrisk:mainfrom
RomanHotsiy:fix-indices-threshhold-0

Conversation

@RomanHotsiy
Copy link

Fixes #762

@RomanHotsiy
Copy link
Author

Hey @krisk 🙌

Thanks for the great lib! I hit one problem and noticed it was already reported #762 so I decided to fix it.

The fix is one-liner and I added a unit test to cover it.

Please, let me know if you want me to adjust something or if you feel this is not a good fit in general (so I will maintain a fork or implement a workaround on top). Thanks in advance!

@swithek
Copy link

swithek commented Jun 24, 2024

@krisk Are there any plans to merge this? The project I'm working on is affected by this problem too.

@NicolasDurant
Copy link

NicolasDurant commented Jun 26, 2024

Having the same issue and this PR fixes it, if changed locally in my node_modules. Would be great, if this could be merged.

Although to my understanding there could be still multiple indices returned as in my case, where I have a very long string that can contain the exact string match multiple times. So, the test of this PR could be updated to reflect that.

@github-actions github-actions bot added the Stale label Oct 26, 2024
@github-actions github-actions bot closed this Nov 25, 2024
@aaron-wc-chen-appier
Copy link

encountered the same issue. Is there a chance to re-open this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All indices return with threshold = 0 aren't a perfect match

4 participants